package componenthasservice;

import componenthasservice.ComponentHasServiceMatch;
import org.eclipse.viatra2.emf.incquery.runtime.api.IMatchProcessor;
import sysmodel.Component;

/**
 * A match processor tailored for the ComponentHasService pattern.
 * 
 * Clients should derive an (anonymous) class that implements the abstract process().
 * 
 */
public abstract class ComponentHasServiceProcessor implements IMatchProcessor<ComponentHasServiceMatch> {
  /**
   * Defines the action that is to be executed on each match.
   * @param pComponent the value of pattern parameter component in the currently processed match 
   * 
   */
  public abstract void process(final Component component);
  
  @Override
  public void process(final ComponentHasServiceMatch match) {
    process(match.getComponent());  				
    
  }
}
